Parameters where is the address of a table into which the path to each file found will be placed. The path to this table must already exist.
index is the full path to an OnLocation index. If it is a null string, all indexes known to OnLocation will be searched.
searchMode is the mode of the search. The valid values for this are NameContains, NameEndsWith, NameExactly, NameStartsWith, TextExactly, and TextRoot. If it is null, NameContains is assumed.
searchString is the string to search for.
searchAndOr is "And" or "Or" to indicate whether this is an "and" or an "or" search. It is ignored unless searchMode is either TextExactly or TextRoot.
Action The specified OnLocation index is searched (or all indexes are searched) and the path name of each file matching the search criteria is placed in a table at "where".
Parameters where is the address of a table into which information about each file found will be placed. The path to this table must already exist.
index is the full path to an OnLocation index. If it is a null string, all indexes known to OnLocation will be searched.
searchMode is the mode of the search. The valid values for this are NameContains, NameEndsWith, NameExactly, NameStartsWith, TextExactly, and TextRoot. If it is null, NameContains is assumed.
searchString is the string to search for.
searchAndOr is "And" or "Or" to indicate whether this is an "and" or an "or" search. It is ignored unless searchMode is either TextExactly or TextRoot.
fileCount is the maximum number of files to return. If it is 0 there is no limit.
timeOut is the maximum time the search may take in 60ths of a second. If it is 0 there is no limit.
startPosition is the postition in the index to start searching at, 0 means to start at the beginning. It is ignored if the index parameter is null.
Action The specified OnLocation index is searched (or all indexes are searched) and information about each file matching the search criteria is placed in a table at "where".
The table created has three entries:
where^.fileCount is the count of the number of files returned
where^.endPosition is the ending position of the search. This can be passed in the startPosition of a subsequent call to lookupInfo to continue a search that did not complete.
where^.fileList is a table with one entry for each file found. Each of these entries is in turn a table with 8 entries:
where^.filelist.filennn.path is the path to the folder containing file (ending in a colon).
where^.filelist.filennn.filename is the name of the file.
where^.filelist.filennn.type is the four character file type of the file.
where^.filelist.filennn.creator is the four character creator ID of the file.
where^.filelist.filennn.modDate is the time at which the file was last modified.
where^.filelist.filennn.createData is the time at which the file was created.
where^.filelist.filennn.size is the size of the file in bytes.
where^.filelist.filennn.flags is a number representing the sum of the following attributes that apply to the file:
« 18 « A table is built at "ScratchPad.Answer" containing the path to each file with "DocServer" in its name. All indexes are searched and there is no limit to the number of files returned or the time taken.
Notes There seems to be a bug in OnLocation version 1.0 which makes some of the search modes fail to find any files.
The index passed in the second parameter can be anywhere, it does not need to be one known to OnLocation.
If a very general search is done with no limits, you will likely cause either OnLocation or Frontier to run out of memory. Such searches should be done in pieces using the last three parameters to control things.
Because this returns more information about each file, it is quite a bit slower than OnLocation.lookupPath.